package com.rock.pkp.model;

import java.io.Serializable;

public class RockKeytable implements Serializable {
    /**
     * ID
     *
     * @mbg.generated
     */
    private Integer id;

    /**
     * 表名
     *
     * @mbg.generated
     */
    private String tablename;

    /**
     * 表描述
     *
     * @mbg.generated
     */
    private String remarks;

    /**
     * 主键值
     *
     * @mbg.generated
     */
    private Integer keyvalue;

    /**
     * 步长
     *
     * @mbg.generated
     */
    private Integer step;

    /**
     * 数量
     *
     * @mbg.generated
     */
    private Integer keynum;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTablename() {
        return tablename;
    }

    public void setTablename(String tablename) {
        this.tablename = tablename;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Integer getKeyvalue() {
        return keyvalue;
    }

    public void setKeyvalue(Integer keyvalue) {
        this.keyvalue = keyvalue;
    }

    public Integer getStep() {
        return step;
    }

    public void setStep(Integer step) {
        this.step = step;
    }

    public Integer getKeynum() {
        return keynum;
    }

    public void setKeynum(Integer keynum) {
        this.keynum = keynum;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", tablename=").append(tablename);
        sb.append(", remarks=").append(remarks);
        sb.append(", keyvalue=").append(keyvalue);
        sb.append(", step=").append(step);
        sb.append(", keynum=").append(keynum);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        RockKeytable other = (RockKeytable) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTablename() == null ? other.getTablename() == null : this.getTablename().equals(other.getTablename()))
            && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()))
            && (this.getKeyvalue() == null ? other.getKeyvalue() == null : this.getKeyvalue().equals(other.getKeyvalue()))
            && (this.getStep() == null ? other.getStep() == null : this.getStep().equals(other.getStep()))
            && (this.getKeynum() == null ? other.getKeynum() == null : this.getKeynum().equals(other.getKeynum()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTablename() == null) ? 0 : getTablename().hashCode());
        result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
        result = prime * result + ((getKeyvalue() == null) ? 0 : getKeyvalue().hashCode());
        result = prime * result + ((getStep() == null) ? 0 : getStep().hashCode());
        result = prime * result + ((getKeynum() == null) ? 0 : getKeynum().hashCode());
        return result;
    }
}